package com.cabrida.livestar.register;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.cabrida.livestar.BaseActivity;
import com.cabrida.livestar.R;
import com.cabrida.livestar.config.Global;
import com.cabrida.livestar.main.MainActivity;

public class RegisterSucceedActivity extends BaseActivity {
	public static final String TAG = RegisterSucceedActivity.class
			.getSimpleName();
	private ImageView iv_back;
	private Button btn_goto_main;
	private TextView tv_user;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

	}

	@Override
	protected void findViewById() {
		// TODO Auto-generated method stub
		setContentView(R.layout.activity_register_succeed);
		iv_back = (ImageView) findViewById(R.id.iv_back);
		btn_goto_main = (Button) findViewById(R.id.btn_goto_main);
		tv_user = (TextView) findViewById(R.id.tv_user);
		tv_user.setText("你的livestar账号为："+Global.U_nickname);
	}

	@Override
	protected void initView() {
		// TODO Auto-generated method stub
		iv_back.setOnClickListener(this);
		btn_goto_main.setOnClickListener(this);
	}

	@Override
	public void onBackPressed() {
		// TODO Auto-generated method stub
		super.onBackPressed();
		openActivity(MainActivity.class);
		this.finish();
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		super.onClick(v);
		switch (v.getId()) {
		case R.id.iv_back:
			openActivity(MainActivity.class);
			this.finish();
			break;
		case R.id.btn_goto_main:
			openActivity(MainActivity.class);
			this.finish();
			break;

		default:
			break;
		}
	}
}
